<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="/page/common/public.jspf"%>
<%@ page import="com.hengpeng.itfints.tools.PageUtil" %>
<% 
	PageUtil pageUtil = (PageUtil)request.getAttribute("PageUtil");
%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset=utf-8" />
<title>我要投资</title>
<meta name="viewport" content="width=1000, initial-scale=0.9"/>
<link rel="stylesheet" type="text/css" href="${path}/css/base.css"/>
<link rel="stylesheet" type="text/css" href="${path}/css/layout.css"/>
<script src="${path }/js/common/jquery1.10.2.min.js"></script>
<script src="${path }/js/common/helper.js?v=${v}"></script>
<script src="${path }/js/common/cookie.js?v=${v}"></script>
<script src="${path }/js/jquery.circliful.min.js"></script>
<script src="${path }/js/common/search.js?v=${v}"></script>
<style type="text/css">
.circliful {position: relative; }
.circle-text, .circle-info, .circle-text-half, .circle-info-half {
    width: 100%;
    position: absolute;
    text-align: center;
    display: inline-block;
}
.circle-info, .circle-info-half {color: #999;}
.circliful .fa {margin: -10px 3px 0 3px;
	position: relative;
	bottom: 4px;
}
</style>
<script type="text/javascript">
$(function(){
	$('.myStat').circliful();
});
function selectTag(showType){
	if (showType == "INVEST") {//投标产品列表
		window.location.href = "<%=request.getContextPath()%>/borrowInfo/list.htm";
	} else if (showType == "ASSIGN") {//债权产品列表
		window.location.href = "<%=request.getContextPath()%>/assign/list.htm";
	} else {
		
	}
}
//分页
function go (page, total) {
	if (page > total) {
		page = total;
	}
	$("#curPage").val(page);
	$("#myform").submit();
}
$(document).ready(function(){
	//$("#zt").val($("#h_zt").val());
	//$("#qx").val($("#h_qx").val());
	//$("#sy").val($("#h_sy").val());
	//$("#gm").val($("#h_gm").val());
	//$("#area").val($("#h_area").val());
	//$("#guran").val($("#h_guran").val());
	
	$("a[isSearch='YES']").click(function(){
		var k = $(this).attr("searchName");
		var v = $(this).attr("searchValue");
		$("#"+k).val(v);
		$("#myform").submit();
	});
	
	$("a[isSearch='YES']").removeClass("cur");
	$("input[type='hidden']").each(function(){
		var name = $(this).attr("name");
		var v = $(this).val();
		$("a[isSearch='YES'][searchName='"+name+"'][searchValue='"+v+"']").addClass("cur");
	});
});
</script>

</head>
<body bgcolor="#f9f9f9">
<!-- head -->
<c:import url="../include/top.jsp">
	<c:param name="type" value="wytz"></c:param>
</c:import>

<div class="youarehere">
	<div class="localtion"><a href="${path }/">首页</a> > 我要投资</div>
</div>

<!--主体-->
<form id="myform" action="<%=request.getContextPath()%>/borrowInfo/list.htm">
	<input type="hidden" id="curPage" name="curPage" />
	
	<input type="hidden" id="zt" name="zt" value="${zt }"/>
	<input type="hidden" id="qx" name="qx" value="${qx }"/>
	<input type="hidden" id="sy" name="sy" value="${sy }"/>
	<input type="hidden" id="gm" name="gm" value="${gm }"/>
	<input type="hidden" id="area" name="area" value="${area }"/>
	<input type="hidden" id="guran" name="guran" value="${guran }"/>
	
<div class="wrap f_yh productContent">
			<div class="filter-wrap fSize_14">
                        <dl class="clearfix invest-filter">
                            <dt>状态</dt>
                            <dd class="clearfix">
                                <span class="all">
                                	<a href="javascript:void(0);" searchName="zt" searchValue="" isSearch="YES" class="cur">全部</a>
                                </span>
                                <ul class="selection clearfix">
                                    <li><a class="" searchName="zt" searchValue="RAISE" isSearch="YES" href="javascript:void(0);">可投资</a></li>
                                    <li><a class="" searchName="zt" searchValue="END" isSearch="YES"   href="javascript:void(0);">已满标</a></li>
                                    <li><a class="" searchName="zt" searchValue="LOANING" isSearch="YES"   href="javascript:void(0);">放款中</a></li>
                                    <li><a class="" searchName="zt" searchValue="REPAYMENTING" isSearch="YES"   href="javascript:void(0);">还款中</a></li>
                                    <li><a class="" searchName="zt" searchValue="REPAYMENTED" isSearch="YES"   href="javascript:void(0);">已还清</a></li>
                                </ul>
                            </dd>
                        </dl>

                        <dl class="clearfix invest-filter">
                            <dt>期限</dt>
                            <dd class="clearfix">
                                <span class="all"><a class="cur" searchName="qx" searchValue="" isSearch="YES" href="javascript:void(0);">全部</a></span>
                                <ul class="selection clearfix">
                                    <li><a class="" searchName="qx" searchValue="less3" isSearch="YES"  href="javascript:void(0);">3个月以下</a></li>
                                    <li><a class="" searchName="qx" searchValue="3to6" isSearch="YES"  href="javascript:void(0);">3-6个月</a></li>
                                    <li><a class="" searchName="qx" searchValue="6to12" isSearch="YES"  href="javascript:void(0);">6-12个月</a></li>
                                    <li><a class="" searchName="qx" searchValue="morethan12" isSearch="YES"  href="javascript:void(0);">12个月以上</a></li>
                                </ul>
                            </dd>
                        </dl>
                        

                        <dl class="clearfix invest-filter">
                            <dt>收益</dt>
                            <dd class="clearfix">
                                <span class="all"><a class="cur" searchName="sy" searchValue="" isSearch="YES"  href="javascript:void(0);">全部</a></span>
                                <ul class="selection clearfix">
                                    <li><a class="" searchName="sy" searchValue="less10" isSearch="YES"   href="javascript:void(0);">10%以下</a></li>
                                    <li><a class="" searchName="sy" searchValue="10to15" isSearch="YES"   href="javascript:void(0);">10%-15%</a></li>
                                    <li><a class="" searchName="sy" searchValue="15to20" isSearch="YES"   href="javascript:void(0);">15%-20%</a></li>
                                    <li><a class="" searchName="sy" searchValue="morethan20" isSearch="YES"   href="javascript:void(0);">20%以上</a></li>
                                </ul>
                            </dd>
                        </dl>
                        

                        <dl class="clearfix invest-filter">
                            <dt>规模</dt>
                            <dd class="clearfix">
                                <span class="all"><a class="cur" searchName="gm" searchValue="" isSearch="YES"  href="javascript:void(0);">全部</a></span>
                                <ul class="selection clearfix">
                                    <li><a class="" searchName="gm" searchValue="less200" isSearch="YES"  href="javascript:void(0);">200万以下</a></li>
                                    <li><a class="" searchName="gm" searchValue="200to500" isSearch="YES"  href="javascript:void(0);">200-500万</a></li>
                                    <li><a class="" searchName="gm" searchValue="500to800" isSearch="YES"  href="javascript:void(0);">500-800万</a></li>
                                    <li><a class="" searchName="gm" searchValue="morethan800" isSearch="YES"  href="javascript:void(0);">500-800万</a></li>
                                </ul>
                            </dd>
                        </dl>      
                        <dl class="clearfix  invest-filter last-col">
                            <dt>地区</dt>
                            <dd class="clearfix">
                                <span class="all">
                                	<a class="cur" href="javascript:void(0);" searchName="area" searchValue="" isSearch="YES"  data-identity="fundGroupId" data-val="">全部</a>
                                </span>
                                <ul class="selection clearfix">
                                    <li class=""><a searchName="area" searchValue="BEIJING" isSearch="YES"  class="">北京市</a></li>
                                    <li class=""><a searchName="area" searchValue="TIANJIN" isSearch="YES"  class="">天津市</a></li>
                                    <li class=""><a searchName="area" searchValue="CHONGQING" isSearch="YES"  class="">重庆市</a></li>
                                    <li class=""><a searchName="area" searchValue="SHANGHAI" isSearch="YES"  class="">上海市</a></li>
                                    <li class=""><a searchName="area" searchValue="HEBEI" isSearch="YES"  class="">河北省</a></li>
                                    <li class=""><a searchName="area" searchValue="SANXI" isSearch="YES"  class="">山西省</a></li>

                                    <li class="more hidden"><a searchName="area" searchValue="JILIN" isSearch="YES"  class="">吉林省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="LIAONING" isSearch="YES"  class="">辽宁省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="HEILONGJIANG" isSearch="YES"  class="">黑龙江省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="SHANXI" isSearch="YES"  class="">陕西省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="GANSHU" isSearch="YES"  class="">甘肃省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="QINGHAI" isSearch="YES"  class="">青海省</a></li>
                                    

                                    <li class="more hidden"><a searchName="area" searchValue="SHANDONG" isSearch="YES"  class="">山东省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="FUJIAN" isSearch="YES"  class="">福建省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="ZHEJIANG" isSearch="YES"  class="">浙江省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="TAIWAN" isSearch="YES"  class="">台湾省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="HENAN" isSearch="YES"  class="">河南省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="HUBEI" isSearch="YES"  class="">湖北省</a></li>
                                    
                                    
                                    <li class="more hidden"><a searchName="area" searchValue="HUNAN" isSearch="YES"  class="">湖南省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="JIANGXI" isSearch="YES"  class="">江西省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="JIANGSHU" isSearch="YES"  class="">江苏省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="ANHUI" isSearch="YES"  class="">安徽省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="GUANGDONG" isSearch="YES"  class="">广东省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="HAINAN" isSearch="YES"  class="">海南省</a></li>
                                    
                                    <li class="more hidden"><a searchName="area" searchValue="SICHUAN" isSearch="YES"  class="">四川省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="GUIZHOU" isSearch="YES"  class="">贵州省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="YUNNAN" isSearch="YES"  class="">云南省</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="NEIMENGGU" isSearch="YES"  class="">内蒙古自治区</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="XINGJIANG" isSearch="YES"  class="">新疆维自治区</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="NINXIA" isSearch="YES"  class="">宁夏回族自治区</a></li>
                                    
                                    <li class="more hidden"><a searchName="area" searchValue="GUANGXI" isSearch="YES"  class="">广西壮族自治区</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="XIZANG" isSearch="YES"  class="">西藏自治区</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="XIANGGANG" isSearch="YES"  class="">香港特别行政区</a></li>
                                    <li class="more hidden"><a searchName="area" searchValue="AOMEN" isSearch="YES"  class="">澳门特别行政区</a></li>
                                </ul>
                            </dd>
                                <a class="display-indicator">
                                    <span class="indicator-text">更多</span>
                                    <span class="icon-arrow-big"></span>
                                </a>
                        </dl>
</div>
</div>
<script type="text/javascript">
$(function() {
	r = $(".selection li.more");
    $(".display-indicator .indicator-text").click(function() {
        $(this).text(r.is(":hidden") ? "收起" : "更多");
        r.slideToggle();
    });
});
</script>
<div class="wrap f_yh">
<div class="box" style="margin-bottom: 50px;overflow: auto;background: #fff">
    	<div class="dh_pub_list" id="tags">
            <ul>
                <li><a href="javascript:void(0);" class="overbg">综合排序</a></li>
               <!--<li><a onclick="selectTag('ASSIGN')" href="javascript:void(0);">转让专区</a></li> -->
               <li class="r">共有 <span><%=pageUtil.getTotalCount()%></span> 个符合要求的资金信息</li>
            </ul>
        </div>
<div class="clearfix"></div>
<div>
<table cellpadding="0" cellspacing="0" class="clubTable" width="100%">
<tr class="borderBottom_dd">
<td>项目名称</td>
<td>年化率</td>
<td>融资金额</td>
<td>借款期限</td>
<!-- <td>担保机构</td> -->
<td>保障方式</td>
<td>进度</td>
<td>&nbsp;</td>
</tr>
<c:forEach items="${dataList}" var="auto" varStatus="sta">
<tr class="<c:if test="${sta.index%2 eq 0 }">borderBottom_d1</c:if>" onmouseover="this.className='borderBottom_d2 over_bgcolor'" onmouseout="this.className='<c:if test="${sta.index%2 eq 0 }">borderBottom_d1</c:if>'">
<td>
<p class="borrow_title"><a href="<%=request.getContextPath()%>/borrowInfo/detail.htm?borrowInfoId=${auto.id}">${auto.borrowName}</a></p>
<p class="marginT_10">出借人已投${auto.raiseMoney/100}元</p>
</td>
<td><font class="fSize_24 f_orange">${auto.borrowRate}</font>%</td>
<td>
<p><font class="fSize_24">
<c:choose>
<c:when test="${auto.borrowMoney/100/10000 >= 1}">
<fmt:formatNumber value="${auto.borrowMoney/100/10000}" pattern="#0"></fmt:formatNumber>  
</c:when>
<c:otherwise>
${auto.borrowMoney/100/10000}
</c:otherwise>   
</c:choose>
</font>万元</p>
</td> 
<td>
<p><font class="fSize_16">${auto.borrowDuration}</font>个月</p></td>
<%-- <td>
<p><font class="fSize_15">${auto.guaranteeRealName}</font></p></td> --%>
<td><font class="fSize_15">本息全额担保</font></td>
<td><div class="myStat" data-dimension="60" 
data-text="<fmt:formatNumber type="number" 
value="${(auto.raiseMoney / auto.borrowMoney) * 100}" 
maxFractionDigits="1"/>%" 
data-percent="<fmt:formatNumber 
type="number" value="${(auto.raiseMoney / auto.borrowMoney) * 100}" 
maxFractionDigits="1"/>" 
data-info="New Clients" 
data-width="4" data-fontsize="14" data-fgcolor="#61a9dc" data-bgcolor="#f2f2f2">
</div></td>
<td>
<c:choose>
<c:when test="${auto.status eq 'RAISE'}">
<input type="button" class="blueBtn" onclick="detail('${auto.id}')"  value="马上投标" />
</c:when>
<c:otherwise><a href="javascript:void(0);" class="btn_over">${auto.status.text}</a></c:otherwise>
</c:choose>
</td>
</tr>
</c:forEach>
</table>
</div>
	<div class="paginations">
		<div class="page-bottom">
			记录总数<%=pageUtil.getTotalCount()%>条 当前页/总页数<%=pageUtil.getCurrentPage()%> 
			/<%=pageUtil.getPageCount()%>每页显示<%=pageUtil.getPageSize()%>条 
			<a onclick="javascript:go(1,<%=pageUtil.getPageCount()%>);" href="javascript:void(0);" name="pagebar_frist" class="page-start"><span>首页</span></a> 
			<a onclick="javascript:go(<%=(pageUtil.getCurrentPage() - 1)%>,<%=pageUtil.getPageCount()%>);" href="javascript:void(0);" name="pagebar_pre" class="page-prev"><span>上一页</span></a> 
			<a onclick="javascript:go(<%=(pageUtil.getCurrentPage() + 1)%>,<%=pageUtil.getPageCount()%>);" href="javascript:void(0);" name="pagebar_next" class="page-next"><span>下一页</span></a> 
			<a onclick="javascript:go(<%=pageUtil.getPageCount()%>,<%=pageUtil.getPageCount()%>);" href="javascript:void(0);" name="pagebar_last" class="page-end"><span>末页</span></a> 
		</div>
	</div>
</div>
</div>
<!--             </div>             
        </div>
</div> -->
<!--主体-->
</form> 
<!--foot-->
   <c:import url="../include/foot.jsp"></c:import>
<!--foot--> 
</body>
</html>
<script type="text/javascript">
		function detail (id) {
			window.location.href = "<%=request.getContextPath()%>/borrowInfo/detail.htm?borrowInfoId="+id+"";
		}
</script> 